<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>我的会员管理</title>
<%@ include file="../security/include.inc.jsp"%>
<link href="<%=basePath%>/scripts/prd/logo.css" rel="stylesheet"
	type="text/css" />
<script type="text/javascript"
	src="${pageContext.request.contextPath }/scripts/migou/js/popup.js"></script>
<style>
.table4 table td {
	border-bottom: none;
}
</style>
</head>
<body>
	<%@ include file="header.jsp"%>
	<div class="main">
		<div id="step-1" class="table1" style="margin-bottom: 25px; display: none;">

			<div class="title1">
				<div class="th2">申领升级会员等级</div>
			</div>

			<div class="table4" style="margin-top: -8px;">
				<table cellpadding="0" cellspacing="0" bgcolor="#DCDCDC" border="0">
					<tr>
						<td
							style="width: 28%; text-align: right; color: #333; font-size: 18px; font-weight: bold;">当前会员等级：</td>
						<td class="ctd"
							style="width: 80%; padding-left: 15px; font-size: 18px; font-weight: bold;">${levelName
							}</td>
					</tr>
				</table>
			</div>

		</div>

		<div id="step-2" class="table1"
			style="margin-bottom: 25px; ">

			<div class="title1">
				<div class="th2">确认缴纳会员费</div>
			</div>
			<input
				type="hidden" name="pay_type" id="pay_type">
			<div class="table4" style="margin-top: -8px;">
				<table cellpadding="0" cellspacing="0" bgcolor="#DCDCDC" border="0">
					<tr>
						<td
							style="width: 28%; text-align: right; color: #333; vertical-align: top; font-size: 15px;">选择会员级别：</td>
						<td class="ctd" style="width: 80%; padding-left: 15px;">
							<p style="font-size: 15px; margin-bottom: 10px;">
								<input id="grade_type" onclick="setGradeAmt(this.value);"
									type="radio" name="grade_type" value="1">正式会员
							</p>
						</td>
					</tr>
					<tr>
						<td style="width: 28%; text-align: right; color: #333;">需支付金额：</td>
						<td class="ctd" style="width: 80%; padding-left: 15px;"><span
							style="font-size: 16px; color: #F17F05" id="grade_amt">0.00</span>
							<span>元</span></td>
					</tr>
					<tr>
							<td style="color: #333; text-align: right;">支付方式：</td>
							<td style="color: #333;">
								<div id="pay_tab">
									<a id="chinabanklogo" style="font-size: 18px;"
										href="javaScript:void(0); " onclick="setPayType(2);"> <!-- 网银在线 -->
									</a> <a id="alipaylogo" style="font-size: 18px;"
										href="javaScript:void(0);" onclick="setPayType(3);"> <!-- 支付宝 -->
									</a>
								</div>
							</td>
						</tr>
				</table>
				<div class="qpbtn"
					style="clear: both; text-align: left; padding-left: 300px; padding-top: 20px;">
					<input id="bankSign" name="" type="button" value="确认支付"
						class="nextbtn go_focus" onclick="subData()" />
				</div>
			</div>
		</div>


	</div>
	<form id="recForm" method="post" target="_blank">
	<input type="hidden" id="amount" name="amount">
	</form>
	<div class="popup_payment" id="popup_payment">
		<div class="pp_close">
			<a href="javascript:void(0);" onclick="EV_closeAlert();">X</a>
		</div>
		<div class="pp_content">
			<div class="pp_prompt">
				请您在新打开的页面上<br />完成付款。
			</div>
			<div class="pp_text">
				付款完成前请不要关闭此窗口。<br />完成付款后请根据您的情况点击下面的按钮：
			</div>
			<div class="pp_btn">
				<a href="${pageContext.request.contextPath}/member/paylist?v_oid=${v_oid}">已完成付款</a>&emsp;&emsp;<a
					href="javascript:void(0);" onclick="payProblem()">付款遇到问题</a>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		$(function() {
			$("#navi2").addClass("navi_content_a_on");
			$("#grade_type").attr("checked",true);
			setGradeAmt('1');
			setPayType(2);
		})
		function payProblem(){
			EV_closeAlert();
			location.href="${pageContext.request.contextPath}/member/level";
		}
		$("#pay_tab a").click(function() {

			$(this).addClass("current").siblings().removeClass("current");

			//$("#cb_bal_flag").attr("checked",false);
			//document.getElementById("tr_pwd1").style.display = "none";
		});
		function setGradeAmt(grade_type) {
			if (grade_type == '1') {
				$("#grade_amt").text('${levelMaster.level_fee}');
				$("#amount").val('${levelMaster.level_fee}');
			} 
			
		}
		function setPayType(code) {
			$("#pay_type").val(code);
		}
		function subData() {
			var str1 = $("#pay_type").val();
			if ("" == str1 || 0 == str1) {
				alert("请选择支付方式");
			} else {
				var transAmt = $("#amount").val();
				if ("" == transAmt || 0 == transAmt) {
					alert("请选择会员级别");
				}else{
					$("#recForm").attr("action","<%=basePath%>/member/send?v_oid=${v_oid}");
					EV_modeAlert('popup_payment');
					$("#recForm").submit();
				}
			}
		}
	</script>
</body>
</html>